import { defineComponent, ref } from "vue";
import styles from "./FootNote.module.scss";
import { useStore as useIndexStore } from "@/store/index";
import Agreement from "../../components/Agreement/Agreement";

export default defineComponent({
  setup() {
    const indexStore = useIndexStore();
    const agreementRef = ref(null as any);
    return () => (
      <>
        <div class={styles.FootNote}>
          <span>了解更多详情查看</span>
          <span class={styles.agreement}>
            <span onClick={() => {agreementRef.value.open('clause')}}>《产品条款》</span>
            <span onClick={() => {agreementRef.value.open('guarantee_m')}}>《产品详情》</span>
            <span onClick={() => {agreementRef.value.open('statement')}}>《参保须知及声明》</span>
            <span onClick={() => {agreementRef.value.open('claims')}}>《理赔须知》</span>
            <span onClick={() => {agreementRef.value.open('auth')}}>《医保个账支付授权书》</span>
            <span onClick={() => {agreementRef.value.open('inform')}}>《客户告知书》</span>
          </span>
          <span>咨询热线: {indexStore.info.hotline} {`(外地市号码请加拨${indexStore.info.prefix})`}</span>
        </div>
        <Agreement ref={agreementRef} />
      </>
    )
  }
})